﻿using AnesSystem.ViewModels.Pacu.Basic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AnesSystem.ViewModels
{
    public class PacuRecordItemCtrlViewModel : MultitonBaseViewModel
    {
        #region Variables
        protected PacuRecordBaseInfoCtrlViewModel _pacuRecordBaseInfoCtrlViewModel;
        protected PacuRealTimeSignShowCtrlViewModel _pacuRealTimeSignShowCtrlViewModel;
        protected PacuRealTimeItemCtrlViewModel _pacuRealTimeItemCtrlViewModel;
        protected PacuRecordTimeCtrlViewModel _pacuRecordTimeCtrlViewModel;
        protected PacuEventAndMedicineCtrlViewModel _pacuEventAndMedicineCtrlViewModel;
        protected PacuOperStatusItemCtrlViewModel _pacuOperStatusItemCtrlViewModel;
        protected PacuInfusionCtrlViewModel _pacuInfusionCtrlViewModel;
        protected PacuMedicineCtrlViewModel _pacuMedicineCtrlViewModel;
        #endregion


        #region Constructor
        public PacuRecordItemCtrlViewModel(int page)
        {
            CurPage = page;
            InitData();
        }
        #endregion


        #region Properties
        public PacuRecordBaseInfoCtrlViewModel PacuRecordBaseInfoCtrlViewModel
        {
            get
            {
                return _pacuRecordBaseInfoCtrlViewModel;
            }

            set
            {
                _pacuRecordBaseInfoCtrlViewModel = value;
            }
        }

        public PacuRealTimeSignShowCtrlViewModel PacuRealTimeSignShowCtrlViewModel
        {
            get
            {
                return _pacuRealTimeSignShowCtrlViewModel;
            }

            set
            {
                _pacuRealTimeSignShowCtrlViewModel = value;
            }
        }

        public PacuRealTimeItemCtrlViewModel PacuRealTimeItemCtrlViewModel
        {
            get
            {
                return _pacuRealTimeItemCtrlViewModel;
            }

            set
            {
                _pacuRealTimeItemCtrlViewModel = value;
            }
        }

        public PacuRecordTimeCtrlViewModel PacuRecordTimeCtrlViewModel
        {
            get
            {
                return _pacuRecordTimeCtrlViewModel;
            }

            set
            {
                _pacuRecordTimeCtrlViewModel = value;
            }
        }

        public PacuEventAndMedicineCtrlViewModel PacuEventAndMedicineCtrlViewModel
        {
            get
            {
                return _pacuEventAndMedicineCtrlViewModel;
            }

            set
            {
                _pacuEventAndMedicineCtrlViewModel = value;
            }
        }

        public PacuOperStatusItemCtrlViewModel PacuOperStatusItemCtrlViewModel
        {
            get
            {
                return _pacuOperStatusItemCtrlViewModel;
            }

            set
            {
                _pacuOperStatusItemCtrlViewModel = value;
            }
        }

        public PacuInfusionCtrlViewModel PacuInfusionCtrlViewModel
        {
            get
            {
                return _pacuInfusionCtrlViewModel;
            }

            set
            {
                _pacuInfusionCtrlViewModel = value;
            }
        }

        public PacuMedicineCtrlViewModel PacuMedicineCtrlViewModel
        {
            get
            {
                return _pacuMedicineCtrlViewModel;
            }

            set
            {
                _pacuMedicineCtrlViewModel = value;
            }
        }



        #endregion


        #region 依赖属性


        #endregion


        #region Event


        #endregion


        #region PrivateMethods
        /// <summary>
        /// 创建多页复苏单ViewModel模块(不能使用单例)
        /// </summary>
        protected virtual void CreataViewModels()
        {
            _pacuRecordBaseInfoCtrlViewModel = new PacuRecordBaseInfoCtrlViewModel(CurPage);
            _pacuRealTimeSignShowCtrlViewModel = new PacuRealTimeSignShowCtrlViewModel(CurPage);
            _pacuRealTimeItemCtrlViewModel = new PacuRealTimeItemCtrlViewModel(CurPage);
            _pacuRecordTimeCtrlViewModel = new PacuRecordTimeCtrlViewModel(CurPage);
            _pacuEventAndMedicineCtrlViewModel = new PacuEventAndMedicineCtrlViewModel(CurPage);
            _pacuOperStatusItemCtrlViewModel = new PacuOperStatusItemCtrlViewModel(CurPage);
            _pacuMedicineCtrlViewModel = new PacuMedicineCtrlViewModel(CurPage);
            _pacuInfusionCtrlViewModel = new PacuInfusionCtrlViewModel(CurPage);
        }

        #endregion


        #region Public/ProtectedMethods
        public override void InitData()
        {
            CreataViewModels();
        }


        /// <summary>
        /// //多页面非单例控件刷新需指定页数
        /// </summary>
        public override void Refresh()
        {
            _pacuRecordBaseInfoCtrlViewModel.Refresh();
            _pacuRealTimeSignShowCtrlViewModel.Refresh();
            _pacuRealTimeItemCtrlViewModel.Refresh();
            _pacuRecordTimeCtrlViewModel.Refresh();
            _pacuEventAndMedicineCtrlViewModel.Refresh();
            _pacuOperStatusItemCtrlViewModel.Refresh();
            _pacuInfusionCtrlViewModel.Refresh();
            _pacuMedicineCtrlViewModel.Refresh();

            #endregion


            #region EventHandlers


            #endregion

        }
    }
}
